<!DOCTYPE html>
<html>
<head>
    <title>wtf form</title>
</head>
<body>
    <form method="post">
        {{loginForm.csrf_token()}}
        {{loginForm.username.label}}{{loginForm.username}}
        {{loginForm.pwd.label}}{{loginForm.pwd}}
        {{loginForm.submit}}
        <br>
        {# loginForm.errors存储的字段验证的错误信息，dict(string, list)类型 #}
        {% for name,error in loginForm.errors.items() %}
            {{name}}字段->{{error}}
        {% endfor %}
        

        {# flash消息 #}
        {% for m in get_flashed_messages() %}
            {{m}}
        {% endfor %}
    </form>
</body>
</html>